home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple II Magazines (PO)
/
Nibble Volume 11, No. 03 (1990-03)(MindCraft Publishing)(Side A)[a].zip
/
Nibble Volume 11, No. 03 (1990-03)(MindCraft Publishing)(Side A)[a].po
/
BASICS.ASM.txt
< prev
next >
Wrap
Text File
|
1996-12-24
|
4KB
|
123 lines
****************************
* BASICS.ASM Source Code *
* by Sandy Mossberg *
* COPYRIGHT(C) 1990 *
* MINDCRAFT PUBL. CORP. *
* CONCORD, MA 01742 *
****************************
* APW ASSEMBLER
ScreenMode gequ $80 ;640x200 super hi-res mode
*****************************************************************
*
StartUp start
*
* Startup tool sets:
*
*****************************************************************
using GlobalData
; Startup first 2 tool sets:
_TLStartUp ;----start Tool Locator
pha ;space for result
_MMStartUp ;----start Memory Manager
jsr HandlErr
PullWord MasterID ;save master ID
; Startup other tool sets:
PushLong #0 ;space for result
PushWord MasterID ;master ID
PushWord #0 ;ptr is reference
PushLong #SSRecOrig ;ptr to orig StartStop record
ldx #$1801 ;----call StartUpTools
jsl $E10000
jsr HandlErr
PullLong SSRecFinal ;ptr to final StartStop record
_InitCursor ;convert cursor: wait -> arrow
rts
;................................................................
;
; StartUp data:
;
SSRecOrig anop ;original StartStop record
dc i2'0' ;flag word must be zero
dc i2'ScreenMode' ;640x200 super hi-res
dc i2'0' ;set by StartUpTools
dc i4'0' ;set by StartUpTools
dc i2'TTSize/4' ;number of tool sets
ToolArray dc i2'$03,$0300' ;Miscellaneous Tools
dc i2'$04,$0301' ;QuickDraw II
dc i2'$05,$0301' ;Desk Manager
dc i2'$06,$0300' ;Event Manager
dc i2'$07,$0200' ;Scheduler
dc i2'$09,$0201' ;Apple Desktop Bus
dc i2'$0A,$0202' ;SANE
dc i2'$0B,$0200' ;Integer Math
dc i2'$0C,$0201' ;Text Tools
dc i2'$0E,$0301' ;Window Manager
dc i2'$0F,$0301' ;Menu Manager
dc i2'$10,$0301' ;Control Manager
dc i2'$12,$0300' ;QuickDraw Auxiliary
dc i2'$13,$0300' ;Print Manager
dc i2'$14,$0301' ;LineEdit
dc i2'$15,$0301' ;Dialog Manager
dc i2'$16,$0300' ;Scrap Manager
dc i2'$17,$0300' ;Standard File Operations
dc i2'$1B,$0301' ;Font Manager
dc i2'$1C,$0301' ;List Manager
dc i2'$22,$0100' ;TextEdit
TTSize equ *-ToolArray ;number of array bytes
end
*****************************************************************
*
ShutDown start
*
* Shutdown tools sets:
*
*****************************************************************
using GlobalData
PushWord #0 ;ptr is reference
PushLong SSRecFinal ;ptr to final StartStop record
ldx #$1901 ;----call ShutDownTools
jsl $E10000
PushWord MasterID ;master ID
_MMShutDown
_TLShutDown
rts
end
*****************************************************************
*
HandlErr start
*
* Check for error and handle fatal error:
*
*****************************************************************
bcs FatalErr ;error detected
rts ;no error on carry clear
FatalErr pha ;error code in A reg
PushLong #0 ;use default failure message
_SysFailMgr ;die a horrible death
end
*****************************************************************
*
GlobalData data
*
* Global program data:
*
*****************************************************************
SSRecFinal ds 4 ;ptr to final StartStop record
MasterID ds 2 ;master memory ID of application
end